package ro.imc.rest.client.display.menu;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Image;


public class MenuItemForm extends Composite {

	private static MenuItemFormUiBinder uiBinder =
		GWT.create(MenuItemFormUiBinder.class);
	@UiField Label strTitle;
	@UiField Image imageIco;
	
	private MenuItemObject objectCreator;
	interface MenuItemFormUiBinder extends UiBinder<Widget, MenuItemForm> {
	}

	public MenuItemForm(MenuItemObject objectCreator) {
		initWidget(uiBinder.createAndBindUi(this));
		strTitle.setText(objectCreator.getTitle());
		imageIco.setUrl(objectCreator.getIcoUrl());
		this.objectCreator = objectCreator;
	}

	
	public MenuItemObject getObjectCreator() {
	
		return objectCreator;
	}

	
	public void setObjectCreator(MenuItemObject objectCreator) {
	
		this.objectCreator = objectCreator;
	}

}
